import pandas as pd
from statsmodels.formula.api import ols
from statsmodels.stats.anova import anova_lm

data = pd.read_table("test3_2.txt", sep=' ')
df = pd.DataFrame(data, columns=['Alevel', 'value'])
model = ols('value~C(Alevel)', df).fit()
result = anova_lm(model)
print(result)